//
// AAttack.cpp for  in /home/gomes_m//RPBaraze
// 
// Made by mickael gomes
// Login   <gomes_m@epitech.net>
// 
// Started on  Fri Sep  6 15:09:58 2013 mickael gomes
// Last update Fri Sep  6 15:54:43 2013 mickael gomes
//

#include		"AAttack.hh"

AAttack::AAttack(int crit, int dmg, int fluctuate, std::string const &name)
  : critHit_(false), critical_(crit), damage_(dmg), fluctuate_(fluctuate), name_(name)
{

}

bool			AAttack::hasCrit()
{
  return (critHit_);
}

std::string	   const &AAttack::getName() const
{
  return (name_);
}

int			AAttack::attackRange(void)
{
  int	add;

  add = random() % (fluctuate_ * 2) + 1;
  return (damage_ + add - fluctuate_);
}
